package com.ke.jun.view

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.MotionEvent
import android.view.View
import com.ke.jun.view.widght.DrawView

class MainActivity : AppCompatActivity() {
    private val drview by lazy(LazyThreadSafetyMode.NONE) {findViewById<DrawView>(R.id.drview)  }
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        drview.setOnTouchListener { view, event ->
            drview.x = event.x
            drview.y = event.y
            drview.invalidate()
            true
        }

    }
}